<table>	
	<table search="unit">

		<filter name="'check_default'">
			<check value="vars.var_sg == 0"/>
			<check value="vars.var_rifle == 0"/>
			<check value="vars.var_default == 1"/>			
		</filter>
		
		<filter name="'check_shotgunner'">
			<check value="vars.var_sg == 1"/>
			<check value="vars.var_rifle == 0"/>			
			<check value="vars.var_default == 0"/>			
		</filter>
		
		<filter name="'check_rifleman'">
			<check value="vars.var_rifle == 1"/>
			<check value="vars.var_sg == 0"/>			
			<check value="vars.var_default == 0"/>			
		</filter>
	
		<variables>
			<var_l_lower_arm value="0"/>
			<var_l_upper_arm value="0"/>
			<var_l_lower_leg value="0"/>
			<var_l_upper_leg value="0"/>
			<var_r_lower_arm value="0"/>
			<var_r_upper_arm value="0"/>
			<var_r_lower_leg value="0"/>
			<var_r_upper_leg value="0"/>
			<var_head value="0"/>
			<var_sg value="0"/>
			<var_default value="0"/>
			<var_rifle value="0"/>			
			<var_mask value="0"/>
			<var_ragdoll_enabled value="0"/>
			<var_hat_shot value="0"/>
			<var_l_upper_arm_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/l_upper_arm_debris'"/>
			<var_l_lower_arm_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/l_lower_arm_debris'"/>
			<var_r_upper_arm_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/r_upper_arm_debris'"/>
			<var_r_lower_arm_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/r_lower_arm_debris'"/>
			<var_l_upper_leg_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/l_upper_leg_debris'"/>
			<var_l_foot_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/l_foot_debris'"/>
			<var_r_upper_leg_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/r_upper_leg_debris'"/>
			<var_r_foot_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/r_foot_debris'"/>
			<var_head_debris value="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light_commander/debris/head_debris'"/>
			<var_head_debris_1 value="'units/vanilla/characters/enemies/models/german_waffen_ss/debris/r_lower_arm_debris'"/>
			<var_head_debris_2 value="'units/vanilla/characters/enemies/models/german_grunt_light/debris/head_debris'"/>						
		</variables>
	
		<sequence editable_state="true" name="'gadget_meat_grinder'" triggable="true">
			<!-- default -->
			<object filter="'check_default'" enabled="true" name="'g_smg_hipgadgets'"/>
			<object filter="'check_default'" enabled="true" name="'g_smg_hipgadgets_lod1'"/>
			<object filter="'check_default'" enabled="true" name="'g_smg_hipgadgets_lod2'"/>		
			
			<!-- rifleman -->
			<object filter="'check_rifleman'" enabled="true" name="'g_rif_hipgadgets'"/>
			<object filter="'check_rifleman'" enabled="true" name="'g_rif_hipgadgets_lod1'"/>
			<object filter="'check_rifleman'" enabled="true" name="'g_rif_hipgadgets_lod2'"/>	
			
			<object filter="'check_rifleman'" enabled="true" name="'g_head_caucasian_01_short_neck_lod2'"/>			
			<object filter="'check_rifleman'" enabled="false" name="'g_head_caucasian_01_short_neck'"/>
			
			<!-- shotgunner -->
			<object filter="'check_shotgunner'" enabled="true" name="'g_rif_hipgadgets'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_rif_hipgadgets_lod1'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_rif_hipgadgets_lod2'"/>		

			<object filter="'check_shotgunner'" enabled="true" name="'g_head_caucasian_01_short_neck_lod1'"/>			
			<object filter="'check_shotgunner'" enabled="false" name="'g_head_caucasian_01_short_neck'"/>
			
			<object filter="'check_shotgunner'" enabled="true" name="'g_mask'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_mask_lod1'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_mask_lod2'"/>
			
			<object filter="'check_shotgunner'" enabled="true" name="'g_german_hat_m38_officers_sg'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_german_hat_m38_officers_sg_lod1'"/>
			<object filter="'check_shotgunner'" enabled="true" name="'g_german_hat_m38_officers_sg_lod2'"/>
			
			<object filter="'check_shotgunner'" enabled="false" name="'g_german_hat_m38_officers'"/>
			<object filter="'check_shotgunner'" enabled="false" name="'g_german_hat_m38_officers_lod1'"/>
			<object filter="'check_shotgunner'" enabled="false" name="'g_german_hat_m38_officers_lod2'"/>
			
			<body filter="'check_shotgunner'" enabled="true" name="'hit_mask'"/>
			<decal_mesh filter="'check_shotgunner'" enabled="true" name="'c_convex_mask'" />				

		</sequence>		

		<sequence editable_state="true" name="'spawn_helmet'" once="true" triggable="true">
			<graphic_group name="'hat_grp'" visibility="false"/>
			<body enabled="false" name="'hit_helmet'"/>
			
			<spawn_unit filter="'check_hat_shot_false'" name="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light/debris/hat_debris'" position="object_pos('Head')" rotation="object_rot('root_point')" transfer_ang_velocity="v( 50 * rand(), 50 * rand(), 500 * rand() )" transfer_velocity="v( 0, 0, 0 )"/>
			<spawn_unit filter="'check_hat_shot_true'" name="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_light/debris/hat_debris'" position="object_pos('Head')" rotation="object_rot('root_point')" transfer_ang_velocity="v( 50 * rand(), 50 * rand(), 500 * rand() )" transfer_velocity="v( 0, 200 * rand(), ((100 * rand()) + 100 ))"/>
			
			<object filter="'check_shotgunner'" enabled="false" name="'g_mask'"/>
			<object filter="'check_shotgunner'" enabled="false" name="'g_mask_lod1'"/>
			<object filter="'check_shotgunner'" enabled="false" name="'g_mask_lod2'"/>				
			<spawn_unit filter="'check_shotgunner'" name="'units/vanilla/characters/enemies/models/german_black_waffen_sentry_heavy/debris/mask_debris'" position="object_pos('Head')" rotation="object_rot('root_point')" transfer_ang_velocity="v( 50 * rand(), 50 * rand(), 500 * rand() )" transfer_velocity="v( 0, 200 * rand(), 200 * rand() )"/>					
		</sequence>		
		
		<sequence editable_state="true" name="'rifleman'" once="true" triggable="true">
			<set_variables var_rifle="1"/>
			
			<run_sequence name="'gadget_meat_grinder'"/>			
		</sequence>
		
		<sequence editable_state="true" name="'smg'" once="true" triggable="true">		
			<set_variables var_default="1"/>
			
			<run_sequence name="'gadget_meat_grinder'"/>						
		</sequence>

		<sequence editable_state="true" name="'shotgunner'" once="true" triggable="true">
			<set_variables var_sg="1"/>
			
			<run_sequence name="'gadget_meat_grinder'"/>			
		</sequence>				
		
		<sequence editable_state="true" name="'dismember_head_no_blood'" triggable="true">
			<object enabled="true" name="'g_neck_meat'"/>
			<set_variables var_head="1"/>
			<run_sequence name="'toggle_body_parts'" />
			<run_sequence filter="'check_ragdoll_enabled'" name="'switch_to_ragdoll'" start_time="2/30"/>
			<run_sequence name="'toggle_hit_box'" start_time="2/30"/>
		</sequence>

		<sequence editable_state="true" name="'dismember_head'" triggable="true">
			<run_sequence name="'dismember_head_no_blood'"/>
			<run_sequence name="'spawn_helmet'"/>
			<effect name="'effects/vanilla/dismemberment/dis_blood_spray_001'" parent="object( 'Neck' )" position="v()"/>
			
			<function extension="'spawn_manager'" filter="'check_rifleman'" function="'spawn_character_debris'" param1="'dismember_head'" param2="'Head'" param3="vars.var_head_debris_1" param4="1"/>
			<function extension="'spawn_manager'" filter="'check_shotgunner'" function="'spawn_character_debris'" param1="'dismember_head'" param2="'Head'" param3="vars.var_head_debris_2" param4="1"/>
			<function extension="'spawn_manager'" filter="'check_default'" function="'spawn_character_debris'" param1="'dismember_head'" param2="'Head'" param3="vars.var_head_debris" param4="1"/>
		</sequence>		
		
		<sequence editable_state="true" name="'toggle_body_parts'" triggable="true">
			<graphic_group filter="'check_hidden_head'" name="'hat_grp'" visibility="false"/>
			<graphic_group name="'char_grp'" visibility="false"/>
			<object enabled="false" name="'s_body'"/>
			<object enabled="true" filter="'check_intact_l_lower_arm'" name="'g_dsm_l_arm_lower'"/>
			<object enabled="true" filter="'check_intact_l_upper_arm'" name="'g_dsm_l_arm_upper'"/>
			<object enabled="true" filter="'check_intact_r_upper_arm'" name="'g_dsm_r_arm_upper'"/>
			<object enabled="true" filter="'check_intact_r_lower_arm'" name="'g_dsm_r_arm_lower'"/>
			<object enabled="true" name="'g_dsm_body'"/>
			<object enabled="true" filter="'check_intact_l_lower_leg'" name="'g_dsm_l_leg_lower'"/>
			<object enabled="true" filter="'check_intact_l_upper_leg'" name="'g_dsm_l_leg_upper'"/>
			<object enabled="true" filter="'check_intact_r_lower_leg'" name="'g_dsm_r_leg_lower'"/>
			<object enabled="true" filter="'check_intact_r_upper_leg'" name="'g_dsm_r_leg_upper'"/>
			<object enabled="true" filter="'check_intact_head'" name="'s_dsm_head'"/>
			<object enabled="true" filter="'check_intact_l_lower_arm'" name="'s_dsm_l_arm_lower'"/>
			<object enabled="true" filter="'check_intact_l_upper_arm'" name="'s_dsm_l_arm_upper'"/>
			<object enabled="true" filter="'check_intact_r_upper_arm'" name="'s_dsm_r_arm_upper'"/>
			<object enabled="true" filter="'check_intact_r_lower_arm'" name="'s_dsm_r_arm_lower'"/>
			<object enabled="true" name="'s_dsm_body'"/>
			<object enabled="true" filter="'check_intact_l_lower_leg'" name="'s_dsm_l_leg_lower'"/>
			<object enabled="true" filter="'check_intact_l_upper_leg'" name="'s_dsm_l_leg_upper'"/>
			<object enabled="true" filter="'check_intact_r_lower_leg'" name="'s_dsm_r_leg_lower'"/>
			<object enabled="true" filter="'check_intact_r_upper_leg'" name="'s_dsm_r_leg_upper'"/>
			<graphic_group filter="'check_hidden_head'" name="'head_grp'" visibility="false"/>			
			<object enabled="false" filter="'check_hidden_l_lower_arm'" name="'g_dsm_l_arm_lower'"/>
			<object enabled="false" filter="'check_hidden_l_upper_arm'" name="'g_dsm_l_arm_upper'"/>
			<object enabled="false" filter="'check_hidden_r_upper_arm'" name="'g_dsm_r_arm_upper'"/>
			<object enabled="false" filter="'check_hidden_r_lower_arm'" name="'g_dsm_r_arm_lower'"/>
			<object enabled="false" filter="'check_hidden_l_lower_leg'" name="'g_dsm_l_leg_lower'"/>
			<object enabled="false" filter="'check_hidden_l_upper_leg'" name="'g_dsm_l_leg_upper'"/>
			<object enabled="false" filter="'check_hidden_r_lower_leg'" name="'g_dsm_r_leg_lower'"/>
			<object enabled="false" filter="'check_hidden_r_upper_leg'" name="'g_dsm_r_leg_upper'"/>
			<object enabled="false" filter="'check_hidden_head'" name="'s_dsm_head'"/>
			<object enabled="false" filter="'check_hidden_l_lower_arm'" name="'s_dsm_l_arm_lower'"/>
			<object enabled="false" filter="'check_hidden_l_upper_arm'" name="'s_dsm_l_arm_upper'"/>
			<object enabled="false" filter="'check_hidden_r_upper_arm'" name="'s_dsm_r_arm_upper'"/>
			<object enabled="false" filter="'check_hidden_r_lower_arm'" name="'s_dsm_r_arm_lower'"/>
			<object enabled="false" filter="'check_hidden_l_lower_leg'" name="'s_dsm_l_leg_lower'"/>
			<object enabled="false" filter="'check_hidden_l_upper_leg'" name="'s_dsm_l_leg_upper'"/>
			<object enabled="false" filter="'check_hidden_r_lower_leg'" name="'s_dsm_r_leg_lower'"/>
			<object enabled="false" filter="'check_hidden_r_upper_leg'" name="'s_dsm_r_leg_upper'"/>
		</sequence>

		<sequence editable_state="true" name="'switch_to_ragdoll'" triggable="true">
			<set_variables var_ragdoll_enabled="1"/>
			<graphic_group name="'hat_grp'" visibility="false"/>	
			<object filter="'check_hidden_head'" enabled="false" name="'g_mask'" />				
			<body enabled="false" name="'hit_helmet'"/>
			<body enabled="true" name="'rag_Spine'"/>
			<body enabled="true" name="'rag_Spine1'"/>
			<body enabled="true" name="'rag_Spine2'"/>
			<body enabled="true" name="'rag_Hips'"/>
			<body enabled="true" filter="'check_intact_l_upper_leg'" name="'rag_LeftUpLeg'"/>
			<body enabled="true" filter="'check_intact_r_upper_leg'" name="'rag_RightUpLeg'"/>
			<body enabled="true" filter="'check_intact_l_lower_leg'" name="'rag_LeftLeg'"/>
			<body enabled="true" filter="'check_intact_r_lower_leg'" name="'rag_RightLeg'"/>
			<body enabled="true" filter="'check_intact_l_lower_arm'" name="'rag_LeftForeArm'"/>
			<body enabled="true" filter="'check_intact_r_lower_arm'" name="'rag_RightForeArm'"/>
			<body enabled="true" filter="'check_intact_l_upper_arm'" name="'rag_LeftArm'"/>
			<body enabled="true" filter="'check_intact_r_upper_arm'" name="'rag_RightArm'"/>
			<body enabled="true" filter="'check_intact_head'" name="'rag_Head'"/>
			<body enabled="false" filter="'check_hidden_l_upper_leg'" name="'rag_LeftUpLeg'"/>
			<body enabled="false" filter="'check_hidden_r_upper_leg'" name="'rag_RightUpLeg'"/>
			<body enabled="false" filter="'check_hidden_l_lower_leg'" name="'rag_LeftLeg'"/>
			<body enabled="false" filter="'check_hidden_r_lower_leg'" name="'rag_RightLeg'"/>
			<body enabled="false" filter="'check_hidden_l_lower_arm'" name="'rag_LeftForeArm'"/>
			<body enabled="false" filter="'check_hidden_r_lower_arm'" name="'rag_RightForeArm'"/>
			<body enabled="false" filter="'check_hidden_l_upper_arm'" name="'rag_LeftArm'"/>
			<body enabled="false" filter="'check_hidden_r_upper_arm'" name="'rag_RightArm'"/>
			<body enabled="false" filter="'check_hidden_head'" name="'rag_Head'"/>
			<constraint enabled="true" name="'Spine'"/>
			<constraint enabled="true" name="'Spine1'"/>
			<constraint enabled="true" name="'Spine2'"/>
			<constraint enabled="true" filter="'check_intact_l_upper_leg'" name="'LeftUpLeg'"/>
			<constraint enabled="true" filter="'check_intact_r_upper_leg'" name="'RightUpLeg'"/>
			<constraint enabled="true" filter="'check_intact_l_lower_leg'" name="'LeftLeg'"/>
			<constraint enabled="true" filter="'check_intact_r_lower_leg'" name="'RightLeg'"/>
			<constraint enabled="true" filter="'check_intact_l_lower_arm'" name="'LeftForeArm'"/>
			<constraint enabled="true" filter="'check_intact_r_lower_arm'" name="'RightForeArm'"/>
			<constraint enabled="true" filter="'check_intact_l_upper_arm'" name="'LeftArm'"/>
			<constraint enabled="true" filter="'check_intact_r_upper_arm'" name="'RightArm'"/>
			<constraint enabled="true" filter="'check_intact_head'" name="'Head'"/>
			<constraint enabled="false" filter="'check_hidden_l_upper_leg'" name="'LeftUpLeg'"/>
			<constraint enabled="false" filter="'check_hidden_r_upper_leg'" name="'RightUpLeg'"/>
			<constraint enabled="false" filter="'check_hidden_l_lower_leg'" name="'LeftLeg'"/>
			<constraint enabled="false" filter="'check_hidden_r_lower_leg'" name="'RightLeg'"/>
			<constraint enabled="false" filter="'check_hidden_l_lower_arm'" name="'LeftForeArm'"/>
			<constraint enabled="false" filter="'check_hidden_r_lower_arm'" name="'RightForeArm'"/>
			<constraint enabled="false" filter="'check_hidden_l_upper_arm'" name="'LeftArm'"/>
			<constraint enabled="false" filter="'check_hidden_r_upper_arm'" name="'RightArm'"/>
			<constraint enabled="false" filter="'check_hidden_head'" name="'Head'"/>
		</sequence>
		
	</table>
	
	<table search="unit/body;name=[['hit_Head']]/endurance/run_sequence;name=[['spawn_helmet']]" mode="set_values">
		<table filter="'check_not_halloween_ragdoll'" start_time="null"/>	
	</table>
	
</table>